package com.itheima.service.impl;

import com.itheima.dao.PermissionDao;
import com.itheima.domain.Permission;
import com.itheima.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class PermissionServiceImpl implements PermissionService {
    @Autowired
    private PermissionDao permissionDao;
    /*
    查询
     */
    @Override
    public List<Permission> findAll() {
        return permissionDao.findAll();
    }


    /*
    添加
     */
    @Override
    public void save(Permission permission) {
        permissionDao.save(permission);
    }
    /*
      根据id查询
       */
    @Override
    public Permission findById(String id) {
        return permissionDao.findById(id);
    }





}
